FROM node:latest
# MAINTAINER wxjbnu@foxmail.com
# WORKDIR $NODEPATH/book-eggjs

RUN mkdir -p /book-eggjs
WORKDIR /book-eggjs
# Bundle app source
COPY . /book-eggjs
# RUN npm install
RUN npm install --production --registry=https://registry.npm.taobao.org
# RUN npm install pm2 -g
EXPOSE 7001
# CMD ["pm2-runtime"]
# CMD ["npm", "run", "dev"]
CMD ["npm", "start"]
# CMD ["pm2", "index.js"]


# TODO 运行创建镜像的脚本
#docker build -t docker-eggjs .

# docker run -it --rm --name docker-eggjs node ./index.js